<template>
  <nav>
    <!-- <ul v-for="(item, index) in items" :key="index">
      <li :key="index"></li>
    </ul> -->
  </nav>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import scroll from "@/components/scroll.vue";

@Component({})
export default class NodeList extends Vue {
  constructor() {
    super();
  }
  private items: Array<any> = [];
  created() {
    const node = Math.random() * 8;
    for (let i = 0; i < node; i++) {
      const temp: any = {
        value: (Math.random() * 100).toFixed(0),
        children: []
      };
      const l = Math.random() * 10;
      for (let j = 0; j < l; j++) {
        temp.children.push({ value: (Math.random() * 20).toFixed(0) });
      }
      this.items.push(temp);
    }
    console.log(this.items);
  }

  mounted() {}
}
</script>

<style lang="scss" scoped></style>
